package com.ishow.noah.entries

import android.graphics.drawable.Drawable
import com.google.gson.annotations.Expose

/**
 * Created by yuhaiyang on 2017/6/9.
 * APP的信息
 */
class App {
    var title: String? = null
    var packageName: String? = null
    var launchClass: String? = null
    var version: String? = null
    var minSdkVersion = 0
    var targetSdkVersion = 0

    @Transient
    var icon: Drawable? = null

    fun formatSdk(): String {
        return "min: $minSdkVersion \t tar: $targetSdkVersion"
    }

    override fun toString(): String {
        return "App(title=$title, packageName=$packageName, version=$version, minSdkVersion=$minSdkVersion, targetSdkVersion=$targetSdkVersion)"
    }


    object Key {
        const val ICON = "key_app_icon"
        const val DETAIL = "key_app_detail"
    }
}